# module is for objects which will move the player from one field to another

import imagecache

# all subclasses must implement the follow fields:
# destination: a str, which will be looked up in World, that the player will be transported to on touching this link
# destination-coords: a pair of x, y coordinates of where the player should be when they go through the link
# image-path: where the image is stored
class Link:
    def __init__(self, destination, destination_coords):
        self.destination = destination
        self.destination_coords = destination_coords
        self.image_path = "blank"

    def walkable(self):
        return True
        
    def get_image(self):
        return imagecache.get_image(self.image_path)
        
class Door(Link):
    def __init__(self, destination, destination_coords):
        self.destination = destination
        self.destination_coords = destination_coords
        self.image_path = "door"